package cn.csg.iotplatform.module.system.api.project;

import cn.csg.iotplatform.framework.common.pojo.CommonResult;
import cn.csg.iotplatform.module.system.api.project.dto.ProjectRespDTO;
import cn.csg.iotplatform.module.system.enums.ApiConstants;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.Collection;
import java.util.List;

@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC服务-项目")
public interface ProjectApi {

    String PREFIX = ApiConstants.PREFIX + "/project";

    @GetMapping(PREFIX + "/getProjetcInfoByProjectNo")
    @Operation(summary = "获得项目信息")
    @Parameter(name = "projectNo", description = "项目编号", example = "asdakjshdjkashda", required = true)
    CommonResult<ProjectRespDTO> getProjetcInfoByProjectNo(@RequestParam("projectNo") String projectNo);

    @GetMapping(PREFIX + "/list")
    @Operation(summary = "获得项目信息列表")
    @Parameter(name = "ids", description = "部门编号数组", example = "1,2", required = true)
    CommonResult<List<ProjectRespDTO>> getProjectList(@RequestParam("ids") Collection<String> ids);
}
